home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 5 Developer's Kit / vb5 dev kit.iso / dev / ipworks / rshell.fr_ / rshell.fr (.txt)
Encoding:
Visual Basic Form  |  1996-03-13  |  4.5 KB  |  156 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "Remote Shell Client"
  5.    ClientHeight    =   5715
  6.    ClientLeft      =   1080
  7.    ClientTop       =   1410
  8.    ClientWidth     =   8325
  9.    Height          =   6120
  10.    Left            =   1020
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   5715
  13.    ScaleWidth      =   8325
  14.    Top             =   1065
  15.    Width           =   8445
  16.    Begin RSHELL Rshell1 
  17.       Height          =   420
  18.       Left            =   7080
  19.       LocalUser       =   ""
  20.       RegHandle       =   RSHELL.FRX:0000
  21.       RemoteHost      =   ""
  22.       RemoteUser      =   ""
  23.       Top             =   120
  24.       Width           =   420
  25.       WinsockLoaded   =   0   'False
  26.    End
  27.    Begin TextBox tLocalUser 
  28.       Height          =   285
  29.       Left            =   4440
  30.       TabIndex        =   2
  31.       Top             =   480
  32.       Width           =   1815
  33.    End
  34.    Begin TextBox tRemoteUser 
  35.       Height          =   285
  36.       Left            =   1320
  37.       TabIndex        =   1
  38.       Top             =   480
  39.       Width           =   1815
  40.    End
  41.    Begin TextBox tHost 
  42.       Height          =   285
  43.       Left            =   1320
  44.       TabIndex        =   0
  45.       Top             =   120
  46.       Width           =   3975
  47.    End
  48.    Begin TextBox tCommand 
  49.       Height          =   285
  50.       Left            =   1320
  51.       TabIndex        =   3
  52.       Text            =   "ls -al"
  53.       Top             =   840
  54.       Width           =   5535
  55.    End
  56.    Begin TextBox tOutput 
  57.       FontBold        =   0   'False
  58.       FontItalic      =   0   'False
  59.       FontName        =   "Courier New"
  60.       FontSize        =   8.25
  61.       FontStrikethru  =   0   'False
  62.       FontUnderline   =   0   'False
  63.       Height          =   4335
  64.       Left            =   0
  65.       MultiLine       =   -1  'True
  66.       ScrollBars      =   2  'Vertical
  67.       TabIndex        =   6
  68.       Top             =   1320
  69.       Width           =   8295
  70.    End
  71.    Begin CommandButton bExecute 
  72.       Caption         =   "Execute!!"
  73.       Height          =   315
  74.       Left            =   6960
  75.       TabIndex        =   4
  76.       Top             =   840
  77.       Width           =   1215
  78.    End
  79.    Begin Label Label1 
  80.       BackStyle       =   0  'Transparent
  81.       Caption         =   "Local User:"
  82.       Height          =   255
  83.       Index           =   3
  84.       Left            =   3360
  85.       TabIndex        =   9
  86.       Top             =   480
  87.       Width           =   1185
  88.    End
  89.    Begin Label Label1 
  90.       BackStyle       =   0  'Transparent
  91.       Caption         =   "Remote User:"
  92.       Height          =   255
  93.       Index           =   2
  94.       Left            =   60
  95.       TabIndex        =   8
  96.       Top             =   480
  97.       Width           =   1185
  98.    End
  99.    Begin Label Label1 
  100.       BackStyle       =   0  'Transparent
  101.       Caption         =   "Host:"
  102.       Height          =   255
  103.       Index           =   1
  104.       Left            =   60
  105.       TabIndex        =   7
  106.       Top             =   120
  107.       Width           =   1185
  108.    End
  109.    Begin Label Label1 
  110.       BackStyle       =   0  'Transparent
  111.       Caption         =   "Command:"
  112.       Height          =   255
  113.       Index           =   0
  114.       Left            =   60
  115.       TabIndex        =   5
  116.       Top             =   840
  117.       Width           =   1185
  118.    End
  119. Sub bExecute_Click ()
  120. Rshell1.WinsockLoaded = True
  121. Rshell1.WinsockLoaded = True
  122. Rshell1.RemoteHost = tHost
  123. Rshell1.RemoteUser = tRemoteUser
  124. Rshell1.LocalUser = tLocalUser
  125. tOutput = ""
  126. Mousepointer = 11
  127. Rshell1.Command = tCommand
  128. End Sub
  129. Sub Form_Resize ()
  130. If WindowState <> 1 Then
  131.     margin% = tOutput.Left
  132.     tOutput.Width = ScaleWidth - 2 * margin%
  133.     tOutput.Height = ScaleHeight - tOutput.Top - margin%
  134. End If
  135. End Sub
  136. Sub Rshell1_Disconnected (StatusCode As Integer, Description As String)
  137. Mousepointer = 0
  138. End Sub
  139. Sub Rshell1_Stderr (Text As String, EOL As Integer)
  140. tOutput.SelStart = Len(tOutput.Text)
  141. tOutput.SelText = "stderr:  " & Text & Chr$(13) & Chr$(10)
  142. End Sub
  143. Sub Rshell1_Stdout (Text As String, EOL As Integer)
  144. tOutput.SelStart = Len(tOutput.Text)
  145. tOutput.SelText = Text & Chr$(13) & Chr$(10)
  146. End Sub
  147. Sub tCommand_KeyPress (KeyAscii As Integer)
  148. If KeyAscii = 13 Then
  149.     bExecute = True
  150.     KeyAscii = 0
  151. End If
  152. End Sub
  153. Sub tRemoteUser_Change ()
  154. tLocalUser = tRemoteUser
  155. End Sub
  156.